package com.westa.smallshop.util;

import android.support.annotation.Nullable;

import java.util.List;

/**
 * Created by kyle on 16-7-27.
 */
public class ListUtils {

    public static boolean isEmpty(@Nullable List list) {
        if (list == null || list.size() == 0)
            return true;
        else
            return false;
    }

    public static List nullIfEmpty(@Nullable List list) {
        return isEmpty(list) ? null : list;
    }
}
